package com.itqf.springboot_mvc.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.itqf.springboot_mvc.serializer.SexSerializer;
import lombok.Data;

import java.util.Date;

/**
 * projectName: springboot_part
 *
 * @author: 赵伟风
 * time: 2021/9/17 16:08
 * description:
 */
@Data
public class User {

    private String username;
    private String password;
    @JsonProperty("邮箱")
    private String email;
    private int age = 18;

    @JsonSerialize(using = SexSerializer.class)
    private int sex = 0;  //0 男  1 女
    private String info;
    @JsonFormat(pattern="yyyy年MM月dd日 HH:mm:ss",timezone = "GMT+8")
    private Date birthday;
    //如果承接一个请求参数对应多个值! 也就是前端的复选框!
    //后台的实体类设计可以用 集合 或者 数据 进行接值!
    private String [] hb;
}
